﻿#include <cstdio>

#include "Driver/QspiModel.h"

int main() {
  printf("start\n");

  uint8_t buf[100]{};
  memset(buf, 0x0, sizeof(buf));
  for (int i = 0; i < 100; i++) {
    buf[i] = i + 100;
  }
  QspiDriver qspi{};
  // qspi.sectorErased(0x00055000, sizeof(buf));
  qspi.write(buf, sizeof(buf), 0x00055000);

  uint8_t buf1[100]{};
  qspi.read(buf1, sizeof(buf1), 0x00055000);
  // 输出读取到的数据
  for (auto i : buf1) {
    printf("0x%02x ", i);
  }

  printf("done\n");
}
